home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20031118-20041115 / 000280_thucdat@hotmail.com_Tue May 4 15:36:39 2004.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Path: newsmaster.cc.columbia.edu!panix!newsfeed.media.kyoto-u.ac.jp!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnews1.google.com!not-for-mail
  2. From: thucdat@hotmail.com (Dat Nguyen)
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: The Future in C-Kermit
  5. Date: 4 May 2004 12:30:24 -0700
  6. Organization: http://groups.google.com
  7. Lines: 36
  8. Message-ID: <6b1f50ac.0405041130.1755432b@posting.google.com>
  9. NNTP-Posting-Host: 24.118.27.71
  10. Content-Type: text/plain; charset=ISO-8859-1
  11. Content-Transfer-Encoding: 8bit
  12. X-Trace: posting.google.com 1083699024 32455 127.0.0.1 (4 May 2004 19:30:24 GMT)
  13. X-Complaints-To: groups-abuse@google.com
  14. NNTP-Posting-Date: Tue, 4 May 2004 19:30:24 +0000 (UTC)
  15. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14999
  16.  
  17. We simulate things to predict the future. Alan Kay, the grand visioner
  18. of Smalltalk, boldly stated: "The best way to predict the future is to
  19. create one".
  20.  
  21. Well, let's create one in C-Kermit. Yes, it doesn't have to be in
  22. Smalltalk.
  23.  
  24. I am going to open an ice cream store, I would like to forsee the
  25. profit. Sure and again, the whole thing is easier to do in OOP
  26. fashion, even though I also feel at home in 8080 assembler.
  27.  
  28. The objects of this simulation are the store, the customers, the
  29. container to keep track of the events happening at the store: customer
  30. arrivals, customer orders, customer departures; even the random
  31. distribution of events are objects of classes.
  32.  
  33. The same idea to handle realtime events is used here, there is a
  34. process object with a queue waiting for events to come and executes
  35. them.
  36.  
  37. Speaking OOP, what's about inheritance? You'll find it here! Smalltalk
  38. allows only single inheritance, C++ and ... OOP in C-Kermit offers
  39. both: single and multiple inheritance; but that is a subject of
  40. another post.
  41.  
  42. In this simulation, not objects but the events are passed around,
  43. stored and executed when time dues. Everything is very Smalltalk
  44. alike, but written and executed entirely in C-Kermit.
  45.  
  46. The simulation of an ice cream store is implemented in Smalltalk in
  47. the book A Little Smalltalk, by Tim Budd, Addison-Wesley 1987.
  48.  
  49. The implementation in C-Kermit is found at:
  50. http://www.columbia.edu/kermit/ckscripts.html#oops
  51.  
  52. Dat